package com.meowcook.pojo.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.*;
import java.math.BigDecimal;

/**
 * Created with Intellij IDEA.
 * Description:
 * User: 28792
 * Date: 2025-05-10
 * Time: 11:49
 */
@Data
@ApiModel(value = "健康信息参数")
public class HealthInfoDTO {

    @NotNull
    @Range(min = 0, max = 300)
    @ApiModelProperty(value = "身高, 单位是cm, min=0,max=300", required = true)
    private Short height;

    @NotNull
    @DecimalMax(value = "300.00")
    @DecimalMin(value = "0.00")
    @Digits(integer = 3, fraction = 2)
    @ApiModelProperty(value = "体重，单位是kg", required = true)
    private BigDecimal weight;

    @NotNull
    @Max(120)
    @Min(0)
    @ApiModelProperty(value = "年龄,min=0,max=120", required = true)
    private Byte age;

    @NotBlank
    @Length(max = 300)
    @ApiModelProperty(value = "疾病史，可选择，如果用户不填写，则返回字符‘无’", required = true)
    private String diseases;

    @NotNull
    @ApiModelProperty(value = "食味偏好，枚举类: 1-清淡，2-麻辣 3-酸甜", required = true)
    private Byte flavor;
}
